package com.swak.frame.interceptor;

import com.swak.frame.dto.base.BaseOperation;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.lang.Nullable;

import java.lang.reflect.Method;
import java.util.Collection;

/**
 * basic Operation Source
 * 
 * @ClassName: BasicOperationSource.java
 * @author: colley.ma
 * @date: 2022/01/26
 */
public interface BasicOperationSource extends SmartInitializingSingleton, BeanFactoryAware {
    default boolean isCandidateClass(Class<?> targetClass) {
        return true;
    }

    Collection<? extends BaseOperation> getBasicOperations(Method method,
        @Nullable Class<?> targetClass);
}
